﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using WebHoiChoMuaBan.Controllers.Private;

namespace WebHoiChoMuaBan.Controllers.Admin
{
    public class FriendsController : PrivateController
    {
        //
        // GET: /Friends/
        private void Init()
        {
            ViewData["mid"] = "friend";
            //LoadTimeAndCurrency();
        }

        public ActionResult Index()
        {
            int? uid = null;
            if (Session["MemId"] != null)
                uid = (int)Session["MemId"];
            if (!this.IsLogin || uid == null)
                return HomePage();
            Init();
            if (LoadMember(uid.Value) == null)
            {
                return View("~/Views/Private/MakeFriend.aspx");
            }
            return HomePage();
        }

    }
}
